<template>
  <Card>
    <Tabs :value="munName" @on-click="changetab">
      <TabPane label="公海" name="1">
        <cardList ref="cardlist1"></cardList>
      </TabPane>
      <TabPane label="鱼池" name="2">
        <cardList ref="cardlist2"></cardList>
      </TabPane>
      <TabPane label="患者" name="3">
        <cardList ref="cardlist3"></cardList>
      </TabPane>
    </Tabs>
  </Card>
</template>
<script>
import cardList from "./cardList.vue";

export default {
  name: "allocation",
  components: { cardList },
  data() {
    return {
      munName: "1",
    };
  },
  mounted() {
    this.$refs[`cardlist${1}`].initial(this.munName);
  },
  methods: {
    changetab(e) {
      this.$refs[`cardlist${e}`].initial(e);
    },
  },
};
</script>
